<div class="box-left" id="tabela-dias">
	<table class="ui-widget ui-widget-content ui-corner-all" id="dias">
		<thead>
			<tr class="ui-widget-header ui-corner-tl">
				<th>Dia</th>
				<th>Sigla</th>
				<th>Valor Total</th>
				<th>Mais</th>
				<th>Menos</th>
			</tr>

		</thead>
		<tbody>
	<?php 
	$valor_total = 0;
	
	foreach($this->itens as $i => $v) { ?>
	
	<tr>
		<td>
			<?php echo $v['data'];?>
		</td>
		<td>
			<?php echo $v['sem']; ?>
		</td>
		<td class="valor" id="<?php echo $v['id']; ?>">
			<?php echo 'R$: ' . number_format ( $v['valor'], 2 ); $valor_total += $v['valor'];?> 
		</td>
		<td class="plus" align="center" id="<?php echo $v['id']; ?>">
			<span class="ui-icon ui-icon-plusthick"></span>
		</td>
		<td align="center" class="minus" id="<?php echo $v['id']; ?>">
			<span class="ui-icon ui-icon-minusthick"></span>
		</td>
	</tr>
	
	<?php } ?>

		</tbody>
	</table>
</div>

<div class="box-left" id="tabela-contas">
<table class="ui-widget ui-widget-content ui-corner-all" id="contas">
		<thead>
			<tr class="ui-widget-header ui-corner-tl">
				<th>Dia</th>
				<th>Valor</th>
				<th>Descricao</th>
			</tr>

		</thead>
		<tbody>
		<?php 	
		$contas_total = 0;
		
		foreach($this->contas as $i => $v) { ?>
	
		<tr><td><?php echo $v['dia'];?></td><td><?php $contas_total += $v['valor'];echo $v['valor']; ?></td><td><?php echo $v['descricao']; ?></td></tr>
			
		<?php } ?>
		
		
		</tbody>
</table>
</div>

<div class="box-left" id="tabela-final">
<table class="ui-widget ui-widget-content ui-corner-all">
<thead>
			<tr class="ui-widget-header ui-corner-tl">
				<th>Informação</th>
				<th>Valor</th>
			</tr>

		</thead>
<tr><td>Valor em Caixa: </td><td><?php echo $this->cash; ?></td></tr>
<tr><td>Total Diária: </td><td><?php echo $valor_total; ?></td></tr>
<tr><td>Total Contas: </td><td><?php echo $contas_total; ?></td></tr>
<tr><td>Final: </td><td><?php echo (($this->cash) - ($valor_total + $contas_total)); ?></td></tr>
</table>
</div>
	